package com.dcy;

import com.dcy.common.model.ResponseData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author dcy
 */
@SpringBootApplication(exclude= {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@EnableFeignClients
@RestController
@Slf4j
public class DcyTestCenterApplication {

    public static void main(String[] args) {
        SpringApplication.run(DcyTestCenterApplication.class, args);
    }

    @GetMapping(value = "/sayHello/{string}")
    public ResponseData sayHello(@PathVariable String string) {
        log.info("sayHello -=- {}",string);
        return ResponseData.success("Hello Test-Service " + string);
    }
}
